package pers.cz.selenium.component;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.RemoteWebDriver;

/**
 * @program: PostGirl-panent
 * @description: 文本框控件
 * @author: Cheng Zhi
 * @create: 2022-12-27 16:56
 **/
public class TextBoxComponent extends AbstractComponent {

    private RemoteWebDriver driver;
    private WebElement webElement;

    public TextBoxComponent(String fullXPath, RemoteWebDriver driver) {
        this.driver = driver;
        this.webElement = driver.findElementByXPath(fullXPath);
        init();
    }

    @Override
    public WebElement initWebElement() {
        return webElement;
    }

    @Override
    public RemoteWebDriver initDriver() {
        return driver;
    }
}
